import Vue from 'vue'
import VueRouter from 'vue-router'
import HomePage from '@/components/HomePage'

Vue.use(VueRouter)

const routes = [

  {
    path:'/',
    name:'HomePage',
    component: HomePage,
    children:[
      {
        path:'/home',
        meta: { title: '首页' },
        component:() => import('@/components/Home')
      },
      {
        path:'/ManuFacturer',
        meta: { title: '厂商管理' },
        component:() => import('@/views/Zjx-VUE/Facturer/ManuFacturer')
      },
      {
        path:'/ManuFacturerOrders',
        meta: { title: '厂商账户管理' },
        component:() => import('@/views/Zjx-VUE/Facturer/ManuFacturerOrders')
      },
      {
        path:'/UserList',
        meta: { title: '工程师管理' },
        component:() => import('@/views/Zjx-VUE/Engineer/Engineer.vue')
      },
      {
        path:'/ServiceProvider',
        meta: { title: '服务商管理' },
        component:() => import('@/views/Zjx-VUE/ServiceProvider/ServiceProvider.vue')
      },
      {
        path:'/ServicePayMent',
        meta: { title: '服务商支付单管理' },
        component:() => import('@/views/Zjx-VUE/PayMent/ServicePayMent.vue')
      },
      {
        path:'/FacturerPayMent',
        meta: { title: '厂商支付单管理' },
        component:() => import('@/views/Zjx-VUE/PayMent/FacturerPayMent.vue')
      }

    ]

  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
